
import { Globalstyle } from './style'
import { IconFont } from './static/fontSize/iconfont'
import { Provider } from 'react-redux'
import store from './store'
import {BrowserRouter,Route} from 'react-router-dom'
import Header from './common/header'
import Home from './pages/home'
import Detail from './pages/detail/loadable'
import Login from './pages/login'
import write from './pages/write'

function App() {
  return (
    <>
      <Globalstyle></Globalstyle>
      <IconFont></IconFont>
      <Provider store={store}>
        <BrowserRouter>
          <div>
          <Header></Header>
          <Route path="/" exact component={Home}></Route>
          <Route path="/detail/:id" exact component={Detail}></Route>
          <Route path="/login" exact component={Login}></Route>
          <Route path="/write" exact component={write}></Route>
          </div>
        </BrowserRouter>
      </Provider>
    </>
  );
}

export default App;
